﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WebReference;

public partial class Admin_Previous_Pages_PreAshAnalysis : System.Web.UI.Page
{
    Service objService = new Service();

    protected void Page_Load(object sender, EventArgs e)
    {
        bindDataGrid();
    }

    private void bindDataGrid()
    {
        DataSet ds = new DataSet();
        ds = objService.RunSQLQuery("select ash.id,ash.CO2,ash.SO3,ash.P2O5,ash.SiO2,ash.Fe2O3,ash.AL2O3,ash.CaO,ash.MgO,ash.Na2O,ash.K2O,ash.TiO2,ash.Pb,ash.Cd,ash.Cl,ash.Cu,ash.Hg,ash.Mn,ash.Cr,ash.ashProdMethod,ex.ExperimentName from ashanal as ash,experiment as ex where ex.experiment_id=ash.id");
        dgAshAnalysis.DataSource = ds;
        dgAshAnalysis.DataBind();
    }
    protected void dgAshAnalysis_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        dgAshAnalysis.PageIndex = e.NewPageIndex;
        bindDataGrid();
    }
}
